#ifndef __mysqldb_h__
#define __mysqldb_h__

#include <mysql.h>
#include "myapp.h"

typedef struct __mydb_conn_info{
	char	host[64];	// server hostname or IP address
	char    user[64];
	char    pass[64];
	char	db[32];	//default database to use, NULL for none 
	int 	port;	//port number, 0 for default
	char 	sockpipe[64];	//socket file or named pipe name
	int 	flag;		//connection flags, always be 'NULL'
}MYDBCONN;


extern MYSQL *mysql;
int mydb_open(struct __mydb_conn_info* conn);
int mydb_exit(void);
int mydb_query(const char* query, struct __user_query_session* uqueryses);

#endif